package com.lantosec.hmrp.modules.supplier.vo;

import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.supplier.entity.SupplierLinkman;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 供应商联系人 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-02-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SupplierLinkman对象", description="供应商联系人")
public class SupplierLinkmanVO extends BaseVO<SupplierLinkman> {
    private static final long serialVersionUID = 1L;


    public SupplierLinkmanVO(SupplierLinkman entity){
        this.linkmanId = entity.getLinkmanId();
        this.supplierCode = entity.getSupplierCode();
        this.linkmanTitle = entity.getLinkmanTitle();
        this.linkmanName = entity.getLinkmanName();
        this.linkmanTel = entity.getLinkmanTel();
        this.idcard = entity.getIdcard();
        this.idcardFront = entity.getIdcardFront();
        this.idcardBack = entity.getIdcardBack();
        this.idcardEnd = entity.getIdcardEnd();
        this.salesmanFlag = entity.getSalesmanFlag();
        this.qualification = entity.getQualification();
        this.qualificationEnd = entity.getQualificationEnd();
        this.createTime = entity.getCreateTime();
        this.createUser = entity.getCreateUser();
        this.supplierName = entity.getSupplierName();
    }

    @Override
    public SupplierLinkman convertToEntity(){
        return new SupplierLinkman(this);
    }


    @ApiModelProperty(value = "ID")
    private String linkmanId;

    @ApiModelProperty(value = "供应商编码")
    private String supplierCode;

    @ApiModelProperty(value = "头衔")
    private String linkmanTitle;

    @ApiModelProperty(value = "姓名")
    private String linkmanName;

    @ApiModelProperty(value = "联系电话")
    private String linkmanTel;

    @ApiModelProperty(value = "身份证号")
    private String idcard;

    @ApiModelProperty(value = "身份证正面，upload表ID")
    private String idcardFront;

    @ApiModelProperty(value = "身份证正面，upload表ID")
    private String idcardBack;

    @ApiModelProperty(value = "身份证到期日期(yyyy-MM-dd)")
    private String idcardEnd;

    @ApiModelProperty(value = "是否业务员(1是0否)")
    private Integer salesmanFlag;

    @ApiModelProperty(value = "购销资格证，upload表ID")
    private String qualification;

    @ApiModelProperty(value = "购销资格证到期日期(yyyy-MM-dd)")
    private String qualificationEnd;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "创建人")
    private String createUser;

    @ApiModelProperty("供应商名称")
    private String supplierName;
    @ApiModelProperty("供应商准入状态")
    private Integer entryState;
    @ApiModelProperty("身份证正面保存路径")
    private String idcardFrontSavePath;
    @ApiModelProperty("身份证反面保存路径")
    private String idcardBackSavePath;
    @ApiModelProperty("购销资格证保存路径")
    private String qualificationkSavePath;
}
